<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="../../../yl/index.css" />
    <link rel="stylesheet" href="../../../style/index.css" />
    <title>定时器配置</title>
    <style>
        .table_titel {
            margin: 0 15px;
            height: 46px;
            line-height: 46px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .table_titel .titel {
            font-weight: bold;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <div class="title">
            <div>
                定时器名称：<el-input v-model="page.value1" style="width: 200px" placeholder="请输入内容"></el-input>
                <el-button type="danger" style="margin-left: 1%;" @click="check">查询</el-button>
                <el-button style="width: 60px" @click="reset">重置</el-button>
            </div>
        </div>
        <div class="body">
            <div class="right">
                <div class="table_titel">
                    <div class="titel">定时器配置</div>
                </div>
                <el-table height="450" ref="multipleTable" tooltip-effect="dark" :data="Tabletdata.slice((page.PageNumber-1)*page.RowAmount,page.PageNumber*page.RowAmount)">
                    <el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
                    <el-table-column prop="Scheduled_Name" label="定时任务" min-width="250"></el-table-column>
                    <el-table-column label="执行方式" min-width="600">
                        <template v-slot="{row}">
                            <el-radio-group v-model="row.type">
                                <el-radio label="1">每日指定时间执行</el-radio>
                                <el-radio label="2">指定间隔时间执行</el-radio>
                            </el-radio-group>
                        </template>
                    </el-table-column>
                    <el-table-column label="执行时间" width="250" align="center">
                        <template v-slot="{row}">
                            <el-time-select  v-if="row.type=='1'"  value-format="H:m:s"  placeholder="请选择执行时间" v-model="row.timer" :picker-options="{ start: '00:00', step: '01:00', end: '23:00' }"></el-time-select>
                            <div v-else-if="row.type=='2'" style="display: flex;">
                                <el-input type="number" v-model="row.timer" placeholder="请输入间隔时间"></el-input>
                                <el-select style="width: 100px;" v-model="row.time" placeholder="请选择">
                                    <el-option label="秒" value="s"></el-option>
                                    <el-option label="分" value="m"></el-option>
                                    <el-option label="时" value="h"></el-option>
                                </el-select>
                            </div>
                        </template>
                    </el-table-column>
                    <el-table-column prop="Status" label="状态" align="center">
                        <template v-slot="{row}">
                            {{row.istrue?'已开启':'已关闭'}}
                        </template>  
                    </el-table-column>
                    <el-table-column  align="center" label="操作" fixed="right" width="180">
                        <template v-slot="{row}">
                            <el-button :type="row.istrue?'danger':'success'" size="small" @click="Scheduled(row)">{{row.istrue?'关闭':'开启'}}</el-button>
                        </template>
                    </el-table-column>
                </el-table>
                <el-pagination style="margin-top: 1%;" :current-page="page.PageNumber" :page-size="page.RowAmount"
                    :page-sizes="[10, 100, 200, 300, 400]" layout="total, sizes, prev, pager, next, jumper"
                    :total="Tabletdata.length" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
            </div>
        </div>
    </div>
    </div>
    <script src="../../../utils/utils.js"></script>
    <script src="../../../config/config.js"></script>
    <script src="../../../utils/mixins.js"></script>
    <script src="../../../yl/vue.js"></script>
    <script src="../../../yl/index.js"></script>
    <script src="../../../yl/zh-cn.mjs"></script>
    <script src="../../../yl/index.iife.min.js"></script>
    <script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
    <script src="../../../api/request.js"></script>
    <script src="js/index.js"></script>
</body>

</html>